home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 2000 July: Mac OS SDK / Dev.CD Jul 00 SDK2.toast / Development Kits / Cross Platform / QuickTime 4.1.2 Windows SDK / CIncludes / OSAGeneric.h < prev    next >
Encoding:
C/C++ Source or Header  |  2000-04-12  |  3.7 KB  |  137 lines  |  [TEXT/R*ch]

  1. /*
  2.      File:        OSAGeneric.h
  3.  
  4.      Contains:    AppleScript Generic Component Interfaces.
  5.  
  6.      Version:    Technology:    AppleScript 1.1
  7.                  Release:    QuickTime 4.1
  8.  
  9.      Copyright:    (c) 1992-1999 by Apple Computer, Inc., all rights reserved
  10.  
  11.      Bugs?:        For bug reports, consult the following page on
  12.                  the World Wide Web:
  13.  
  14.                      http://developer.apple.com/bugreporter/
  15.  
  16. */
  17. #ifndef __OSAGENERIC__
  18. #define __OSAGENERIC__
  19.  
  20. #ifndef __MACERRORS__
  21.     #include <MacErrors.h>
  22. #endif
  23.  
  24. #ifndef __APPLEEVENTS__
  25.     #include <AppleEvents.h>
  26. #endif
  27.  
  28. #ifndef __OSA__
  29.     #include <OSA.h>
  30. #endif
  31.  
  32.  
  33.  
  34.  
  35. #if PRAGMA_ONCE
  36. #pragma once
  37. #endif
  38.  
  39. #ifdef __cplusplus
  40. extern "C" {
  41. #endif
  42.  
  43. #if PRAGMA_IMPORT
  44. #pragma import on
  45. #endif
  46.  
  47. #if PRAGMA_STRUCT_ALIGN
  48.     #pragma options align=mac68k
  49. #elif PRAGMA_STRUCT_PACKPUSH
  50.     #pragma pack(push, 2)
  51. #elif PRAGMA_STRUCT_PACK
  52.     #pragma pack(2)
  53. #endif
  54.  
  55. /*     NOTE:    This interface defines a "generic scripting component."
  56.             The Generic Scripting Component allows automatic dispatch to a
  57.             specific scripting component that conforms to the OSA interface.
  58.             This component supports OSA, by calling AppleScript or some other 
  59.             scripting component.  Additionally it provides access to the default
  60.             and the user-prefered scripting component.
  61. */
  62.  
  63.  
  64. enum {
  65.                                                                 /* Component version this header file describes */
  66.     kGenericComponentVersion    = 0x0100
  67. };
  68.  
  69. enum {
  70.     kGSSSelectGetDefaultScriptingComponent = 0x1001,
  71.     kGSSSelectSetDefaultScriptingComponent = 0x1002,
  72.     kGSSSelectGetScriptingComponent = 0x1003,
  73.     kGSSSelectGetScriptingComponentFromStored = 0x1004,
  74.     kGSSSelectGenericToRealID    = 0x1005,
  75.     kGSSSelectRealToGenericID    = 0x1006,
  76.     kGSSSelectOutOfRange        = 0x1007
  77. };
  78.  
  79. typedef OSType                             ScriptingComponentSelector;
  80. typedef OSAID                             GenericID;
  81. /* get and set the default scripting component */
  82. EXTERN_API( OSAError )
  83. OSAGetDefaultScriptingComponent    (ComponentInstance         genericScriptingComponent,
  84.                                  ScriptingComponentSelector * scriptingSubType)                FIVEWORDINLINE(0x2F3C, 0x0004, 0x1001, 0x7000, 0xA82A);
  85.  
  86. EXTERN_API( OSAError )
  87. OSASetDefaultScriptingComponent    (ComponentInstance         genericScriptingComponent,
  88.                                  ScriptingComponentSelector  scriptingSubType)                FIVEWORDINLINE(0x2F3C, 0x0004, 0x1002, 0x7000, 0xA82A);
  89.  
  90. /* get a scripting component instance from its subtype code */
  91. EXTERN_API( OSAError )
  92. OSAGetScriptingComponent        (ComponentInstance         genericScriptingComponent,
  93.                                  ScriptingComponentSelector  scriptingSubType,
  94.                                  ComponentInstance *    scriptingInstance)                    FIVEWORDINLINE(0x2F3C, 0x0008, 0x1003, 0x7000, 0xA82A);
  95.  
  96. /* get a scripting component selector (subType) from a stored script */
  97. EXTERN_API( OSAError )
  98. OSAGetScriptingComponentFromStored (ComponentInstance     genericScriptingComponent,
  99.                                  const AEDesc *            scriptData,
  100.                                  ScriptingComponentSelector * scriptingSubType)                FIVEWORDINLINE(0x2F3C, 0x0008, 0x1004, 0x7000, 0xA82A);
  101.  
  102. /* get a real component instance and script id from a generic id */
  103. EXTERN_API( OSAError )
  104. OSAGenericToRealID                (ComponentInstance         genericScriptingComponent,
  105.                                  OSAID *                theScriptID,
  106.                                  ComponentInstance *    theExactComponent)                    FIVEWORDINLINE(0x2F3C, 0x0008, 0x1005, 0x7000, 0xA82A);
  107.  
  108. /* get a generic id from a real component instance and script id */
  109. EXTERN_API( OSAError )
  110. OSARealToGenericID                (ComponentInstance         genericScriptingComponent,
  111.                                  OSAID *                theScriptID,
  112.                                  ComponentInstance         theExactComponent)                    FIVEWORDINLINE(0x2F3C, 0x0008, 0x1006, 0x7000, 0xA82A);
  113.  
  114.  
  115.  
  116.  
  117. #if PRAGMA_STRUCT_ALIGN
  118.     #pragma options align=reset
  119. #elif PRAGMA_STRUCT_PACKPUSH
  120.     #pragma pack(pop)
  121. #elif PRAGMA_STRUCT_PACK
  122.     #pragma pack()
  123. #endif
  124.  
  125. #ifdef PRAGMA_IMPORT_OFF
  126. #pragma import off
  127. #elif PRAGMA_IMPORT
  128. #pragma import reset
  129. #endif
  130.  
  131. #ifdef __cplusplus
  132. }
  133. #endif
  134.  
  135. #endif /* __OSAGENERIC__ */
  136.  
  137.